<!DOCTYPE html>
<html>

<head>
  <meta charset="utf-8">
  <meta name="renderer" content="webkit|ie-comp|ie-stand">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
  <meta http-equiv="Cache-Control" content="no-siteapp" />
  <title>宿舍水电管理</title>
</head>

<body>
  <div id="app">
    <div class="dorm-mgr">
      <el-tabs v-model="activeMenu" class="dorm-mgr-tabs full-tabs">
        <el-tab-pane lazy v-for="menu in menus" :key="menu.name" :label="menu.label" :name="menu.name">
          <component :is="menu.url" class="menu-item"></component>
        </el-tab-pane>
      </el-tabs>
    </div>
  </div>
</body>

<script src="../../myJs/importFile.js"></script>
<script>
  importFile([
    "../base.css",
    "./css/dormSettingForm.css",
    "./css/dormSetting.css",
    "./css/dormEleStatistic.css",
    "./css/personEleStatistic.css"
  ], [
    "/vueSystem/js/checkVaildUtil.js"
  ]);
</script>
<script src="./dormSettingForm.js"></script>
<script src="./dormSetting.js"></script>
<script src="./dormEleStatistic.js"></script>
<script src="./personEleStatistic.js"></script>
<script>
  var app = new Vue({
    el: '#app',
    data: function () {
      return {
        activeMenu: 'dormSetting',
        menus: [{
          label: '宿舍设定',
          name: 'dormSetting',
          url: 'dorm-setting'
        }, {
          label: '宿舍用电统计',
          name: 'dormEleStatistic',
          url: 'dorm-ele-statistic'
        }, {
          label: '个人用电统计',
          name: 'personEleStatistic',
          url: 'person-ele-statistic'
        }]
      };
    },
    components: {
      DormSetting: DormSetting,
      DormEleStatistic: DormEleStatistic,
      PersonEleStatistic: PersonEleStatistic
    }
  });
</script>
<style>
  .dorm-mgr {
    padding-left: 20px;
    height: 100%;
  }

  .menu-item {
    position: relative;
  }
</style>

</html>